//引入Vue
import Vue from 'vue'
//引入VueRouter
import VueRouter from 'vue-router'
// 引入路由组件
import discoverMusic from "@/views/discover-music.vue";
import myMusic from "@/views/my-music.vue";
import follow from "@/views/follow.vue";
// 安装插件
Vue.use(VueRouter)

// 配置路由配置
const routes = [
    // 路由重定向
    {
        path: "/",
        redirect: "/discoverMusic"
    },
    {
        path: "/discoverMusic",
        component: discoverMusic,
    },
    {
        path: "/myMusic",
        component: myMusic,
    },
    {
        path: "/follow",
        component: follow,
    }
]
// 创建路由对象实例
const router = new VueRouter({
    routes,
    //自定义类名
    linkActiveClass:"active",
    linkExactActiveClass:"exact-active"
})

//导出路由对象实例
export default router

